import request from '@/utils/request'

// 登录
export const login = (data) => {
  return request.post('/user-service/user/login', data)
}

// 获取图片
export const getImageCode = (clientToken) => {
  return request.get(`/user-service/user/imageCode/${clientToken}`, {
    responseType: 'blob'
  })
}

// 获取工单详情
// export const getWork = ({ start, end }) => {
//   return request.get(`/task-service/task/collectReport/${start}/${end}`)
// }
// export const getWork = ({ start, end }) => {
//   return request({
//     url: `/task-service/task/collectReport/${start}/${end}`
//   })
// }
// 商品销售前10的数据
export const toptenComm = (topValue, start, end) => {
  return request({
    url: `/order-service/report/skuTop/${topValue}/${start}/${end}`
  })
}
// 工单搜索
export const TaskSearch = (params) => {
  return request.get('/task-service/task/search', {
    params
  })
}
// 工单状态列表
export const WorOrderStatus = () => {
  return request.get('/task-service/task/allTaskStatus')
}
// 运营工单详情
export const yydatalis = id => {
  return request.get(`task-service/task/taskInfo/${id}`)
}
